package com.hey.baseapplication.fragment;

import android.content.Context;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import com.hey.baseapplication.R;
import com.xys.libzxing.zxing.encoding.EncodingUtils;

public class QRCodeFragment extends Fragment {
    private ImageView img;
    private View view;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }



    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        view=inflater.inflate(R.layout.fragment_qrcode, container, false);
        img= (ImageView) view.findViewById(R.id.qr_img);
        Bitmap bitmap= EncodingUtils.createQRCode("么么哒",500,500,null);
        img.setImageBitmap(bitmap);
        return view;
    }

    @Override
    public void onAttach(Context context) {
        super.onAttach(context);
    }

    @Override
    public void onDetach() {
        super.onDetach();
    }




}
